#include <iostream>
using namespace std;
struct intNode{
    int value;
	intNode * next;
	intNode * pre;
    // Constructor
	intNode(int value1,intNode * next1 = nullptr,intNode * pre1 = nullptr)
	{
		value = value1;
		next = next1;
		pre = pre1;
	}
};
int push_intNode(intNode * intnode ,int value1)
{
     // use value1 crate a new node ,and this node's pre is oldnode
     intnode=new intNode(value1,nullptr,intnode);
	 // set oldnode's next is this new node
	 intnode->pre->next = intnode;
}
int pop_intNode(intNode * ptr)
{
     int a = 0;
}

int main()
{	
    intNode * intnode = new intNode(-1,nullptr,nullptr);
    cout<<"hello world"<<endl;
	for(int number=0;number <10;number++)
	{
		intnode = new intNode(number,intnode,nullptr);
	    intnode->next->pre = intnode;	
	}
	push_intNode(intnode,11);
	intNode * ptr = intnode;
	while(ptr->value != -1)
	{
		cout<<ptr->value<<" "<<endl;
		
		ptr = ptr->next;
	}
	push_intNode(intnode,11);
	while(ptr->pre != nullptr)
	{
		cout<<ptr->pre->value<<" ";
		ptr = ptr->pre;
	}
}
